/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package muets;

/**
 *
 * @author Dudu
 */
public class IPSecRule {
private String name,source,destination,type,transport_type,spi,algorythm,key;

    public IPSecRule(String name,String source, String destination, String type, String transport_type, String spi, String algorythm, String key) {
        this.name="IPSecRule : "+source+" >> "+destination;
        this.source = source;
        this.destination = destination;
        this.type = type;
        this.transport_type = transport_type;
        this.spi = spi;
        this.algorythm = algorythm;
        this.key = key;
    }

    public IPSecRule() {
        
    }

    public String getAlgorythm() {
        return algorythm;
    }

    public void setAlgorythm(String algorythm) {
        this.algorythm = algorythm;
    }

    public String getDestination() {
        return destination;
    }

    public void setDestination(String destination) {
        this.destination = destination;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getSpi() {
        return spi;
    }

    public void setSpi(String spi) {
        this.spi = spi;
    }

    public String getTransport_type() {
        return transport_type;
    }

    public void setTransport_type(String transport_type) {
        this.transport_type = transport_type;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final IPSecRule other = (IPSecRule) obj;
        if ((this.name == null) ? (other.name != null) : !this.name.equals(other.name)) {
            return false;
        }
        if ((this.source == null) ? (other.source != null) : !this.source.equals(other.source)) {
            return false;
        }
        if ((this.destination == null) ? (other.destination != null) : !this.destination.equals(other.destination)) {
            return false;
        }
        if ((this.type == null) ? (other.type != null) : !this.type.equals(other.type)) {
            return false;
        }
        if ((this.transport_type == null) ? (other.transport_type != null) : !this.transport_type.equals(other.transport_type)) {
            return false;
        }
        if ((this.spi == null) ? (other.spi != null) : !this.spi.equals(other.spi)) {
            return false;
        }
        if ((this.algorythm == null) ? (other.algorythm != null) : !this.algorythm.equals(other.algorythm)) {
            return false;
        }
        if ((this.key == null) ? (other.key != null) : !this.key.equals(other.key)) {
            return false;
        }
        return true;
    }



}
